package net.sourceforge.cath.context;

public class GlobalTransaction {
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getThread() {
		return thread;
	}
	public void setThread(String thread) {
		this.thread = thread;
	}
	public long getStartTime() {
		return startTime;
	}
	public void setStartTime(long startTime) {
		this.startTime = startTime;
	}
	public long getEndTime() {
		return endTime;
	}
	public long getStartCpuTime() {
		return startCpuTime;
	}
	public void setStartCpuTime(long startCpuTime) {
		this.startCpuTime = startCpuTime;
	}
	public long getEndCpuTime() {
		return endCpuTime;
	}
	public void setEndCpuTime(long endCpuTime) {
		this.endCpuTime = endCpuTime;
	}
	public void setEndTime(long endTime) {
		this.endTime = endTime;
	}
	public String getInitiator() {
		return initiator;
	}
	public void setInitiator(String initiator) {
		this.initiator = initiator;
	}
	String id;
	String thread;
	long startTime;
	long endTime;
	String initiator;
	long startCpuTime;
	long endCpuTime;
	String relationship; // String for representing relationships with other transations
	
	public String getRelationship() {
		return relationship;
	}
	public void setRelationship(String relationship) {
		this.relationship = relationship;
	}
	public String toString(){
		return null;
	}
	
	public long getElaspedTime(){
		return endTime - startTime;
	}
	public long getElapsedCpuTime(){
		return (endCpuTime - startCpuTime)/1000000; // change to ms
	
	}
}
